Skip to content

Fix port::Thread to use std::jthread over std::thread#14608

Open
johnmcfarlane wants to merge 1 commit intofacebook:mainfrom
johnmcfarlane:jthread
Open

Fix port::Thread to use std::jthread over std::thread#14608
johnmcfarlane wants to merge 1 commit intofacebook:mainfrom
johnmcfarlane:jthread

Conversation

@johnmcfarlane
Copy link
Copy Markdown

While discussing #14603 as a solution to #13303, it occurred to me that the real issue is the loss of data when the program is terminated without first existing threads. The solution provided by C++20 is std::jthread. This MR floats simply replacing some use of std::thread with std::jthread in the project as an alternative fix to #14603.

to avoid surprising std::terminate in a failure path reported
in facebook#13303.
@meta-cla meta-cla Bot added the CLA Signed label Apr 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant